<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04_BOM操作</title>
</head>
<body>
<button onclick="alert('警告框')">弹出警告框</button>
<button onclick="confirm('您确认要删除吗？')">弹出确认框</button>
<button onclick="prompt('请输入您的会员卡号：')">弹出输入框</button>
<script>
    //将参数转为整数
    console.log(parseInt(6.6))//6
    console.log(parseInt(6.1))//6
    console.log(parseInt(6))//6
    console.log(parseInt('hhhh'))//NaN
    console.log(parseInt('12hh34h5'))//12
    //将参数转为小数
    console.log(parseFloat('5.6'))//5.6
    console.log(parseFloat('5'))//5
    console.log(parseFloat('hhh'))//NaN
    console.log(parseFloat('12hh34h5'))//12
    //用来判断参数是否为非数字，如果是非数字结果为true，反之为false
    console.log(isNaN('aaa'))//true
    console.log(isNaN(7))//false
    console.log(isNaN(7.7))//false

</script>
</body>
</html>